Optimal. Leaf size=45 \[ -\frac {2 a^2 \cos (e+f x)}{f}-\frac {a^2 \sin (e+f x) \cos (e+f x)}{2 f}+\frac {3 a^2 x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2644} \[ -\frac {2 a^2 \cos (e+f x)}{f}-\frac {a^2 \sin (e+f x) \cos (e+f x)}{2 f}+\frac {3 a^2 x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2644
Rubi steps
\begin {align*} \int (a+a \sin (e+f x))^2 \, dx &=\frac {3 a^2 x}{2}-\frac {2 a^2 \cos (e+f x)}{f}-\frac {a^2 \cos (e+f x) \sin (e+f x)}{2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.19, size = 34, normalized size = 0.76 \[ -\frac {a^2 (-6 (e+f x)+\sin (2 (e+f x))+8 \cos (e+f x))}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 41, normalized size = 0.91 \[ \frac {3 \, a^{2} f x - a^{2} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - 4 \, a^{2} \cos \left (f x + e\right )}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 40, normalized size = 0.89 \[ \frac {3}{2} \, a^{2} x - \frac {2 \, a^{2} \cos \left (f x + e\right )}{f} - \frac {a^{2} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.09, size = 52, normalized size = 1.16 \[ \frac {a^{2} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-2 \cos \left (f x +e \right ) a^{2}+a^{2} \left (f x +e \right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.30, size = 47, normalized size = 1.04 \[ a^{2} x + \frac {{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2}}{4 \, f} - \frac {2 \, a^{2} \cos \left (f x + e\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.87, size = 123, normalized size = 2.73 \[ \frac {3\,a^2\,x}{2}-\frac {a^2\,\left (\frac {3\,e}{2}+\frac {3\,f\,x}{2}\right )-a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3-a^2\,\left (\frac {3\,e}{2}+\frac {3\,f\,x}{2}-4\right )+a^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (2\,a^2\,\left (\frac {3\,e}{2}+\frac {3\,f\,x}{2}\right )-a^2\,\left (3\,e+3\,f\,x-4\right )\right )}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.37, size = 78, normalized size = 1.73 \[ \begin {cases} \frac {a^{2} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {a^{2} x \cos ^{2}{\left (e + f x \right )}}{2} + a^{2} x - \frac {a^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {2 a^{2} \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a \sin {\relax (e )} + a\right )^{2} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________